
import lianyunPortSvg from "../images/lianyunPort.svg";
import xuweiPortSvg from "../images/xuweiPort.svg";
import ganyuPortSvg from "../images/ganyuPort.svg";
import guanhePortSvg from "../images/guanhePort.svg";

const baseUrl = "/lianyungang-screen"
const cesiumBaseUrl = `${baseUrl}/cesium/`;
//GeoJSON地图服务器地址
const geoJsonUrl = `${baseUrl}/geoJsonData`;
//本地影像瓦片路径
// const tileUrl = "/_api/api/lianyungang-screen/tiles";  //开发环境
// const tileUrl = "/api/lianyungang-screen/tiles";    //Nginx代理
const tileUrl = "/lianyungang-screen-server/tiles"    //Tomcat
// const tileUrl = "http://94.191.49.160:8082/lianyungang-screen-server/tiles";
//天地图影像瓦片路径
const tiandituUrl = "http://t1.tianditu.com/img_c/wmts?layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=aa19a7af5a829438828a13dbcc1c0d69";
//地图范围(左上角，右下角)
const mapExtent = {
    'lt': {
        longitude: 118.9,
        latitude: 35.2
    },
    "rb": {
        longitude: 120.7,
        latitude: 34
    }
}
const port = {
    "lianyunPort": {
        "alias": "连云港区",
        "containerStyle": {
            "width": "700px",
            "height": "410px",
        },
        "center": [34.766, 119.478],
        "zoom": 11,
        "icon": lianyunPortSvg,
        "projects": {
            "baseGeoData": {
                "alias": "基础地理数据"
            },
            "proj": {
                "alias": "方案",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            }
        }
    },
    "xuweiPort": {
        "alias": "徐圩港区",
        "containerStyle": {
            "width": "825px",
            "height": "470px",
        },
        "center": [34.636, 119.589],
        "zoom": 11,
        "icon": xuweiPortSvg,
        "projects": {
            "baseGeoData": {
                "alias": "基础地理数据"
            },
            "preProj": {
                "alias": "工程前",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "等深线", "key": "depth" }
                ]
            },
            "proj_1": {
                "alias": "方案一",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            },
            "proj_2": {
                "alias": "方案二",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            },
            "proj_3": {
                "alias": "方案三",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            },
            "proj_4": {
                "alias": "方案四",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            },
            "proj_5": {
                "alias": "最终方案",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "设计图", "key": "plan" },
                    { "title": "航道", "key": "basin" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            }
        }
    },
    "ganyuPort": {
        "alias": "赣榆港区",
        "containerStyle": {
            "width": "420px",
            "height": "365px"
        },
        "center": [34.948, 119.376],
        "zoom": 9,
        "icon": ganyuPortSvg,
        "projects": {
            "baseGeoData": {
                "alias": "基础地理数据"
            },
            "proj": {
                "alias": "方案",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "等深线", "key": "depth" }
                ]
            }
        }
    },
    "guanhePort": {
        "alias": "灌河口",
        "containerStyle": {
            "width": "415px",
            "height": "405px"
        },
        "center": [34.493, 119.829],
        "zoom": 10,
        "icon": guanhePortSvg,
        "projects": {
            "baseGeoData": {
                "alias": "基础地理数据"
            },
            "proj": {
                "alias": "方案",
                "layers": [
                    {
                        "title": "含沙量场",
                        "key": "sandFlow",
                        "checkable": false,
                        "children": [
                            { "title": "年平均", "key": "sandFlow_year_average" },
                            { "title": "七级中风天", "key": "sandFlow_N_7" },
                            { "title": "十级大风天", "key": "sandFlow_N_10" },
                        ]
                    },
                    { "title": "水位流场", "key": "waterFlow" },
                    { "title": "导堤", "key": "plan" },
                    { "title": "等深线", "key": "depth" },
                    { "title": "其他", "key": "others" }
                ]
            }
        }
    }
};

//图层样式
const layerStyle = {
    "base": {
        "color": "#99cc33",
        "stroke": false,
        "interactive": false
    },
    "sandFlow": {
        "color": "rgb(255, 255, 190)",
        "fillOpacity": 0.5,
        "interactive": false,
        "stroke": false
    },
    "plan": {
        "color": "#ff99cc",
        "weight": 1,
        "interactive": false,
        "fillOpacity": 1,
    },
    "basin": {
        "stroke": false,
        "color": "#003399",
        "fillOpacity": 0.1,
        "interactive": false
    },
    "waterFlow": {
        "color": "red",
        "opacity": 1,
        "weight": 2,
        "interactive": false
    },
    "depth": {
        "color": "blue",
        "opacity": 0.5,
        "weight": 2,
        "dashArray": "5",
        "interactive": false,
        "icon": {
            "className": "icon"
        }
    },
    "others": {
        "area": {
            "stroke": false,
            "color": "blue",
            "interactive": false
        },
        "coastline": {
            "opacity": "0.4",
            "colors": ["", "#ffaa00", "#bcb1a5", "#ffaa00", "#ffaa00", "#1100ab", "#849e00", "#a68200", "blue"]
        },
        "label": {
            "icon": {
                "className": "icon"
            }
        }
    }
}
  

export { 
    baseUrl,
    cesiumBaseUrl, 
    port,
    tileUrl,
    tiandituUrl,
    mapExtent,
    geoJsonUrl,
    layerStyle 
}; 